package cn.qingyun.gis.modules.enterprise.controller;


import cn.qingyun.gis.common.Result;
import cn.qingyun.gis.modules.enterprise.service.IHotelService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 酒店数据 前端控制器
 * </p>
 *
 * @author skb
 * @since 2024-04-14
 */
@RestController
@RequestMapping("/hotel")
public class HotelController {

    @Autowired
    private IHotelService hotelService;

    @ApiOperation("获取酒店数据")
    @GetMapping("/list")
    public Result<?> getHotelList(@RequestParam String code){
        return Result.okData(hotelService.getHotelList(code));
    }

    @ApiOperation("获取酒店详情")
    @GetMapping("/detail")
    public Result<?> getHotelDetails(@RequestParam String id){
        return Result.okData(hotelService.getHotelDetails(id));
    }
}
